#include <stdio.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <math.h>

#define USAGE "\n" \
"USAGE: ./client_server [level number] [IP of the server]\n" \
"\nlevel number: 1, 2, 3 or 4\n" \
"\nIP of the server: empty when level number is 4\n" \

#define PORT 9000

void createServer(int *socketS, const int port);
void acceptClients(int socketS, int *socketToClient, int nOfConnections);
void connectToServer(int *socketC, const char *serverIp, const int port);
void quit(char *msg, int returnValue);

int socketAsServer;
int socketAsClient;    
int socketToClient[2];
